SOP 3: Database Using LibreOffice Base
Create table Product with fieldnames prodid, prodname, qty, rate, modelyear with appropriate data
type. Insert minimum 8 records.
- Generate report to display records in ascending order of Prodname.
- Generate report to display records in descending order of Product rate.
- Generate report to display model year wise product list.
- Build a query to display amount (qty*rate).
- Generate a bill report with appropriate titles and calculate amount for each record.
Answer:
1. Creating a Database
- Start → All Programs → LibreOffice → LibreOffice Base
- In the Database Wizard, select "Create a new database" → Save and proceed → Finish
- Save with an appropriate name and location
2. Creating a Table
- Click on "Create Table in Design View"
- Enter fields: prodid, prodname, qty, rate, modelyear with suitable data types
- Right-click on prodid → Set as Primary Key
- Save table as Product
3. Inserting Records
- Double-click the Product table
- Enter at least 8 records manually
4. Generating Reports
a) Ascending Order of Prodname
- Click on Reports → Use Wizard to Create Report
- Select Product table → Add fields → Next
- Sort by prodname (ascending) → Choose layout → Title → Finish
b) Descending Order of Rate
- Repeat steps above, but sort by rate (descending)
c) Model Year Wise Product List
- Repeat report wizard → Sort by modelyear
5. Query to Display Amount (qty * rate)
- Click Queries → Create Query in Design View
- Add Product table → Select all fields
- In a new column, type:
"qty" * "rate" → Alias: Total Amount
- Run the query (F5)
6. Bill Report with Amount
- Use Report Wizard → Add fields including calculated amount
- Choose layout and orientation → Add title → Finish